// src/locales/vxe-table/index.ts

import { i18n } from '@/locales';
import VxeUITable from 'vxe-table';
import vxe_i18n from './vxe-i18n';
export const setupVxeTable = () => {
  // 根据当前语言设置对应的分页配置
  const currentLanguage = i18n.global.locale.value;


  VxeUITable.setup({
    i18n: (key, args) => i18n.global.t(key, args),
    
  });
  
  // 设置当前语言
  if (currentLanguage === 'zh') {
    // VxeUITable.setLanguage('zh-CN');
     vxe_i18n.locale = 'zh_CN'
  } else {
     vxe_i18n.locale = 'en_US'
    // VxeUITable.setLanguage('en-US');
  }
};